 {

        var o = require("./UISoundManager.js"), i = require("./UIPopupBase.js");
        cc.Class({
            extends: i,
            properties: {
                _buttonInteractable: !1
            },
            init: function () {
            },
            onLoad: function () {
                Global.notificationCenter.on(Global.eventName.MSG_REWARD_INFO, this.setData.bind(this), this),
                    this._rewardList = Global.utils.searchNode(this.node, "rewardList");
                Global.msgHandler.requestRewardData("query"), Global.notificationCenter.emit(Global.eventName.MSG_SET_UNDO_RECEIVE, !0);
            },
            setData: function (e) {
                if (Global.utils.hideWaitting(), "query" == e.action) {
                    e.dailyFreeGive.dailyFreeGiveLimitConf;
                    this.total = e.dailyFreeGive.dailyFreeGiveCountConf || 0, this._amount = e.dailyFreeGive.dailyFreeGiveAmountConf || 0,
                        this.left = e.dailyFreeGive.freeGiveCountLeft || 0;
                    e.dailyFreeGive.canRecieveFreeGive, Global.userProfile;
                    this._data = [{
                        icon_name: "WP_4",
                        title1: "每日连续登录礼包",
                        title2: "每日连续登录有礼",
                        button_name: "FL_2",
                        type: "login",
                        btnClickFunc: "onCheckLoginReward"
                    }], this.curGetRewardNum = this.total - this.left + 1, this.showItem();
                } else if ("recieve" == e.action) if (e.tip) Global.utils.showNodeCommon(e.tip, 2),
                    this.closePanel(); else {
                    var t = function () {
                        Global.msgHandler.requestRewardData("query");
                    }.bind(this), n = {
                        reward: e.deltaChip,
                        name: "金币",
                        type: "freegive"
                    };
                    Global.UIPopupManager.addPopup("PopupPanel/Panel_shareGroup_Reward", function (e) {
                        e.getComponent("shareGroup_RewardPanel").setData(n, t), Global.spriteAtlas.setSpriteFrame(e.getComponent("shareGroup_RewardPanel").rewardSp, "Texture/Rewards", "WP_3");
                    });
                }
            },
            showItem: function () {
                cc.log("this._data.length+++", this._data.length);
                for (var e = 0; e < this._data.length; e++) {
                    cc.log("this._data.length+++", e);
                    var t = this.getItem(e);
                    t.active = !0;
                    var n = this._data[e], o = Global.utils.searchNode(t, "icon");
                    Global.spriteAtlas.setSpriteFrame(o.getComponent(cc.Sprite), "Texture/Rewards", n.icon_name),
                        o.width = 105, o.height = 93;
                    var i = Global.utils.searchNode(this.getItem(e), "button"),
                        a = Global.utils.searchComp(t, "title1", cc.Label);
                    a.string = n.title1, "relief" == n.type && (a.string = n.title1 + "  剩余(" + this.left + "/" + this.total + ")"),
                        Global.utils.searchComp(t, "title2", cc.Label).string = n.title2, Global.spriteAtlas.setSpriteFrame(Global.utils.searchComp(t, "title", cc.Sprite), "Texture/Rewards", n.button_name),
                        Global.utils.searchNode(this.getItem(e), "button").on("touchend", this[n.btnClickFunc], this),
                        Global.utils.searchComp(t, "tip", cc.Label).string = e;
                    var r = void 0 == n.isInteractive || n.isInteractive;
                    if (i.getComponent(cc.Button).interactable = r, !r) {
                        var s = i.getComponent(cc.Sprite);
                        Global.spriteAtlas.setSpriteFrame(s, "Texture/shareGetDiamond", "TY_ICON4"), s = Global.utils.searchComp(i, "title", cc.Sprite),
                            Global.spriteAtlas.setSpriteFrame(s, "Texture/shareGetDiamond", "CG_AnNiuZi_8");
                    }
                    r ? i.on("touchend", this[n.btnClickFunc], this) : i.off("touchend", this[n.btnClickFunc], this);
                }
            },
            getItem: function (e) {
                if (this._rewardList) {
                    if (e < this._rewardList.children.length) return this._rewardList.children[e];
                    var t = cc.instantiate(this._rewardList.children[0]);
                    return this._rewardList.addChild(t), t;
                }
            },
            onCheckLoginReward: function () {
                console.log("onCheckLoginReward 查看签到"), o.playEffect("select"), this.isForce_ShowSevenDaysPopup = !0,
                    Global.msgHandler.requestSevenDays_checkin("get");
            },
            onDestroyHook: function () {
                Global.notificationCenter.emit(Global.eventName.MSG_SET_UNDO_RECEIVE, !1);
            },
            OnPanelClose: function () {
                o.playEffect("select"), this.closePanel();
            }
        })
    }